package com.mall.common.dao.impl;

import org.springframework.stereotype.Repository;

import com.mall.common.dao.PaymentLogDao;
import com.mall.common.domain.component.PaymentLogDomain;
import com.mall.common.hibernate.Finder;

@Repository
public class PaymentLogDaoImpl extends BaseDaoImpl<PaymentLogDomain, Long> implements PaymentLogDao {

	@Override
	public boolean isPayReturn(String orderNo, String dealId) {
		String hql = "select 1 from PaymentLogDomain l where l.orderNo = :orderNo and l.dealId = :dealId";
		Finder finder = Finder.create(hql);
		finder.setParam("orderNo", orderNo);
		finder.setParam("dealId", dealId);
		return finder.findHQLList().isEmpty();
	}


}
